<script setup lang="ts">
    import { defineProps } from 'vue';

    import Article from "@/views/Main/User/Home/Render/Article/index.vue";
    import Collect from "@/views/Main/User/Home/Render/Collect/index.vue";
    import Comment from "@/views/Main/User/Home/Render/Comment/index.vue";
    import Follow from "@/views/Main/User/Home/Render/Follow/index.vue";
    
    const componentMap = {
        'article_tab': Article,
        'collect_tab': Collect,
        'comment_tab': Comment,
        'follow_tab': Follow
    }

    defineProps({
        type: {
            type: String,
            required: true
        },
        yhnm: {
            type: String,
            required: true
        }
    });
</script>
<template>
    <component :is="(componentMap as any)[type]" :yhnm="yhnm" />
</template>